//le recepteur lit le serial et si la valeur est 1 alors il allume la led
//si la valeur lu est 0 alors il eteint la led
int incomingByte = 0;
int led = 8;
int activity = 9;

void setup(){
  // Start up our serial port, we configured our XBEE devices for 9600 bps. 
  Serial.begin(9600);
}

void loop(){
  if (Serial.available() > 0) {
    // read the incoming byte:
    incomingByte = Serial.read();
  }
     
  if(incomingByte ==  '0'){
    digitalWrite(led, LOW);
  } 
  else if (incomingByte == '1'){ 
    digitalWrite(led, HIGH);    
  }
  
  digitalWrite(activity, HIGH);
}








